<?php
/* Smarty version 4.5.5, created on 2025-05-12 17:38:34
  from 'E:\Develop\php\projects\app\view\product\daytrade\list.html' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '4.5.5',
  'unifunc' => 'content_6821c19a0a5230_93941449',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '26ec10b4860db84cb4c19b6084dcc9afb44a82d3' => 
    array (
      0 => 'E:\\Develop\\php\\projects\\app\\view\\product\\daytrade\\list.html',
      1 => 1730731217,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_6821c19a0a5230_93941449 (Smarty_Internal_Template $_smarty_tpl) {
?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8">
  <title><?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['index']['title'];?>
</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="/static/lay/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="/static/lay/layui/index.css" media="all">
</head>
<body>

<div class="layui-fluid">
     <div class="layui-card">
      <div class="layui-form layui-card-header layuiadmin-card-header-auto">
        <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label"><?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['table']['name'];?>
</label>
            <div class="layui-input-inline">
              <input type="text" name="title" placeholder="<?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['public']['pinput'];?>
" autocomplete="off" class="layui-input">
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label"><?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['table']['code'];?>
</label>
            <div class="layui-input-inline">
              <input type="text" name="procode" placeholder="<?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['public']['pinput'];?>
" autocomplete="off" class="layui-input">
            </div>
          </div>
          <div class="layui-inline">
              <label class="layui-form-label"><?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['table']['class'];?>
</label>
              <div class="layui-input-inline" >
                  <select name="cid">
                         <option value="0"><?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['table']['higtestype'];?>
</option>
                         <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['cateclass']->value, 'item');
$_smarty_tpl->tpl_vars['item']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['item']->value) {
$_smarty_tpl->tpl_vars['item']->do_else = false;
?>
                         <option value="<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
"><?php echo $_smarty_tpl->tpl_vars['item']->value['strsign'];
echo $_smarty_tpl->tpl_vars['item']->value['title'];?>
</option>
                         <?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                  </select>
              </div>
          </div>

          <div class="layui-inline">
            <button class="layui-btn layuiadmin-btn-list" lay-submit lay-filter="search">
              <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
            </button>
          </div>
        </div>
      </div>
      </div>

  <div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-body">
            <table id="datalist" lay-filter="datalist"></table>
            <?php echo '<script'; ?>
 type="text/html" id="toolbartop">
                <button class="layui-btn layui-btn-sm" lay-event="redatalist"><?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['public']['refresh'];?>
</button>
                <button class="layui-btn layui-btn-sm add muetool"><?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['public']['add'];?>
</button>
            <?php echo '</script'; ?>
>
            <?php echo '<script'; ?>
 type="text/html" id="zizeng">{{d.LAY_TABLE_INDEX+1}}<?php echo '</script'; ?>
>
            <?php echo '<script'; ?>
 type="text/html" id="bartool">
                <a class="layui-btn layui-btn-xs edit" data-set="{{d.id}}"><?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['public']['edit'];?>
</a>
                <a class="layui-btn layui-btn-danger layui-btn-xs del" data-set="{{d.id}}"><?php echo $_smarty_tpl->tpl_vars['lang']->value['page']['public']['del'];?>
</a>
            <?php echo '</script'; ?>
>
          </div>
        </div>
  </div>

<?php echo '<script'; ?>
 src="/static/lay/layui/layui.js"><?php echo '</script'; ?>
>
<?php echo '<script'; ?>
 type="text/javascript">
    layui.config({
       base: '/static/lay/' //静态资源所在路径
    }).extend({
         roleper:'lib/roleper'
         ,xadmin:'lib/xadmin'
         ,lang:'lib/lang'
       }).use(['roleper', 'xadmin', 'table', 'lang'], function () {

            var $ = layui.$
            , form = layui.form
            , table = layui.table
            , roleper = layui.roleper
            , toolbar = roleper.showtool({mid:22}) ? false : true; //根据权限是否显示操作列
            var lang=layui.lang.init();
            table.render({
            elem: '#datalist'
            , height: 'auto'
            , url: '#' //数据接口
            , method: 'post'
            , page: true //开启分页
            , limit: 10
            , toolbar: '#toolbartop'
            , defaultToolbar: ['filter', 'exports', 'print']
            , cols: [[ //表头
                {field: 'zizeng', title: function(){ return lang.serial }, align: "center", fixwidth: true, width: 80, templet:'#zizeng'},
                {field: 'title', title: function(){ return lang.name }},
                {field: 'procode', title: function(){ return lang.code }},
                {field: 'cid', title: function(){ return lang.class+'ID' }, hide:true},
                {field: 'cname', title: function(){ return lang.toclass }},
                {field: 'orderid', title: function(){ return lang.sort }, hide:true},
                {field: 'opentype', title: function(){ return lang.openmark+lang.method },
                    templet: function(d) {
                       if (d.opentype <2) {
                            return '<button class="layui-btn layui-btn-green layui-btn-xs">'+lang.auto+'</button>';
                        } else if(d.opentype > 1 ) {
                            return '<button class="layui-btn layui-btn-orayell layui-btn-xs">'+lang.noauto+'</button>';
                        }
                      }

                },
                {field: 'status', title: function(){ return lang.status },
                 templet: function(d) {
                       if (d.status == 1) {
                            return '<button class="layui-btn layui-btn-green layui-btn-xs">'+lang.openmark+'</button>';
                        } else if(d.status == 2) {
                            return '<button class="layui-btn layui-btn-xs">'+lang.closemark+'</button>';
                        } else if(d.status > 2 ) {
                            return '<button class="layui-btn layui-btn-disabled layui-btn-xs">'+lang.close+'</button>';
                        } 
                      }
                },
                {field: 'createtime',title: function(){ return lang.updatetime }, hide:true},
                {fixed: '', title: function(){ return lang.operation }, width: 160, align: 'center', toolbar: '#bartool', hide:toolbar}
            ]],
            done: function() {
                            layer.closeAll('loading');
                            roleper.render({mid:22,per:[{sys:'add',method:'open'},{sys:'cate',method:'open'},{sys:'edit',method:'open'},{sys:'del',method:'del'}],full:true});//law 设置长宽，full是否全屏，par父窗口打开
            }
        });

        //监听搜索
        form.on('submit(search)', function(data){
          var field = data.field;
          //执行重载
           table.reload('datalist', {
            where: field
            ,page: {
              curr: 1 // 设定当前页为1
            }
          });
        });

        table.on('toolbar(datalist)', function(obj){
            switch(obj.event){
                case 'redatalist':
                    //执行重载
                    table.reload('datalist');
                break;
            };
        });  
            
    });
<?php echo '</script'; ?>
>
</body>
</html>

<?php }
}
